<template>
  <div>
      <div class="container">
          <h1>组件模块</h1>
          <p>count的值为 {{ count }}</p>
          <button @click="count ++"> count + 1 </button>
          <button @click="count = 0"> 重置 count </button>
      </div>
  </div>
</template>

<script>
export default {
    props:{
        init:{
            default: 0,
        },
    },
    data(){
        return{
            count: this.init,
        }
    }
}
</script>

<style lang="less" scoped>
    .container{
        height: 200px;
        border: 1px solid #ccc;
        background-color: aqua;
    }
</style>